{layout name="public/layout" /}
		{include file='yxnavbar'}
<link rel="stylesheet" href="{$_G['URL']['APP_CSS']}back.css">
	<style type="text/css">
	.order-detail-info>div{margin-bottom:10px; padding-left:15px;}
	.page-trade-order h4{font-size:14px; font-weight:700;}
	.page-trade-order .form-group{margin-bottom:0;}
	.page-trade-order .form-group .control-label{font-weight:normal; color:#999;}
	.page-trade-order .order-infos{border-right:1px solid #ddd;}
	.page-trade-order .parting-line{height:1px;border-top:1px dashed #e5e5e5; margin:3px 0;}
	.page-trade-order .order-state{padding-left:40px; position:relative; margin:20px 0 40px;}
	.page-trade-order .order-state>span{color:#07d; position:absolute; left:0; top:5px; font-size:25px; display:inline-block; width:30px; height:30px; border:1px solid #07d; border-radius:30px; text-align:center; line-height:30px;}
	#close-order ul li{padding:5px 15px; cursor:pointer;}
	#close-order ul li:hover{background:#eee;}
	.fix a.js-order-edit-address{display:none; color:red;}
	.fix:hover a.js-order-edit-address{display:inline;}
	.page-trade-order .col-sm-9{word-break: break-word; overflow:hidden;}
	.table-log>tbody>tr>td{border-top:none;}
</style>
<script type="text/javascript">
function submitForm(){
    var form = document.getElementById("myform");
    form.submit();
}
</script>
{if $op == 'edit'}
<div class="clearfix">
	<form class="form-horizontal form" id="form1" action="" method="post" enctype="multipart/form-data">
		<div class="panel panel-default">
			<div class="panel-heading">虚拟红包设置{$item['uid']}-{$item['openid']}</div>
			<div class="panel-body">
				<div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">微信头像</label>
                    <div class="col-sm-8 col-xs-12">
                        {php echo view_form_field_image('avatar',$item['avatar']);}
                    </div>
                </div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require"> </span>微信昵称</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="nickname" value="{$item['nickname']}" class="form-control">
						<div class="help-block">微信昵称</div>
					</div>
				</div>
				<div class="form-group" id="username">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>姓名</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="username" value="{$item['username']}" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>电话</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="mobile" value="{$item['mobile']}" class="form-control">
					</div>
				</div>
				{if $system['fenxiao'] == '1'}
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>红包金额</label>
					<div class="col-sm-9 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon">真实</span>
							<input class="form-control" placeholder="0" name="feesumzs" value="{$feesumzs}" disabled type="text">
							<span class="input-group-addon">+</span>
							<span class="input-group-addon"><span style="color: red;">虚拟</span></span>
							<input class="form-control" placeholder="0" name="feesumxuni" value="{$item['feesumxuni']}" type="text">
							<span class="input-group-addon">=</span>
							<span class="input-group-addon">累计</span>
							<input class="form-control" placeholder="0" name="feesum" value="{php echo $feesumzs + $item['feesumxuni'];}" disabled type="text">
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>红包次数</label>
					<div class="col-sm-9 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon">真实</span>
							<input class="form-control" placeholder="0" name="commcountzs" value="{$commcountzs}" disabled type="text">
							<span class="input-group-addon">+</span>
							<span class="input-group-addon"><span style="color: red;">虚拟</span></span>
							<input class="form-control" placeholder="0" name="commcountxuni" value="{$item['commcountxuni']}" type="text">
							<span class="input-group-addon">=</span>
							<span class="input-group-addon">累计</span>
							<input class="form-control" placeholder="0" name="commcount" value="{php echo $commcountzs + $item['commcountxuni'];}" disabled type="text">
						</div>
					</div>
				</div>
				{/if}
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>推荐成交数</label>
					<div class="col-sm-9 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon">真实</span>
							<input class="form-control" placeholder="0" name="tuijianzs" value="{$tuijianzs}" disabled type="text">
							<span class="input-group-addon">+</span>
							<span class="input-group-addon"><span style="color: red;">虚拟</span></span>
							<input class="form-control" placeholder="0" name="tuijianxuni" value="{$item['tuijianxuni']}" type="text">
							<span class="input-group-addon">=</span>
							<span class="input-group-addon">累计</span>
							<input class="form-control" placeholder="0" name="tuijian" value="{php echo $tuijianzs + $item['tuijianxuni'];}" disabled type="text">
						</div>
					</div>
				</div>
				{if $system['fanpai']==1}
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>抽奖次数</label>
					<div class="col-sm-9 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon"><span style="color: red;">抽奖次数</span></span>
							<input class="form-control" placeholder="0" name="jihui" value="{$item['jihui']}" type="text">
							<span class="input-group-addon">-</span>
							<span class="input-group-addon">已用</span>
							<input class="form-control" placeholder="0" name="fanpaichoujiang" value="{$yichou}" disabled type="text">
							<span class="input-group-addon">=</span>
							<span class="input-group-addon">剩余</span>
							<input class="form-control" placeholder="0" name="yichous" value="{php echo $item['jihui'] - $yichou;}" disabled type="text">
						</div>
					</div>
				</div>
				{/if}
				<!-- <div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>推荐数</label>
					<div class="col-sm-9 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon">真实</span>
							<input class="form-control" placeholder="0" name="responsumzs" value="{$responsumzs}" disabled type="text">
							<span class="input-group-addon">+</span>
							<span class="input-group-addon"><span style="color: red;">虚拟</span></span>
							<input class="form-control" placeholder="0" name="responsumxuni" value="{$item['responsumxuni']}" type="text">
							<span class="input-group-addon">=</span>
							<span class="input-group-addon">累计</span>
							<input class="form-control" placeholder="0" name="responsum" value="{php echo $responsumzs + $item['responsumxuni'];}" disabled type="text">
						</div>
					</div>
				</div> -->
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input name="submit" id="submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
			<input type="hidden" name="__token__" value="{$Request.token}" />
		</div>
	</form>
</div>
{elseif $op == 'display'}

<div class="main">
    <div class="panel panel-info">
        <div class="panel-heading">筛选  <span id="btinfo">{$total}条 {$totalfee}元</span></div>
        <div class="panel-body">
            <form id = "myform" action="./index.php" method="get" class="form-horizontal" role="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="{$_P['m']}" />
                <input type="hidden" name="do" value="{$do}" />
				<div class="form-group">
					<label class="col-xs-12 col-sm-1 col-md-1 control-label">范围</label>
					<div class="col-sm-8 col-xs-8 col-md-8">
						<div class="btn-group">
							<a href="{php echo filter_url('type:-1');}" class="btn {if $type == -1}btn-primary{else}btn-default{/if}">不限 <span style="color: #ff0000">-{$gsumall}</span></a>
							<a href="{php echo filter_url('type:0');}" class="btn {if $type == 0}btn-primary{else}btn-default{/if}">一级开团 <span style="color: #ff0000">-{$gsum0}</span></a>
							<a href="{php echo filter_url('type:1');}" class="btn {if $type == 1}btn-primary{else}btn-default{/if}">一级参团 <span style="color: #ff0000">-{$gsum1}</a>
							{if $gsum2 != 0}
							<a href="{php echo filter_url('type:2');}" class="btn {if $type == 2}btn-primary{else}btn-default{/if}">二级分销 <span style="color: #ff0000">-{$gsum2}</a>
							{/if}
							{if $gsum3 != 0}
							<a href="{php echo filter_url('type:3');}" class="btn {if $type == 3}btn-primary{else}btn-default{/if}">三级分销 <span style="color: #ff0000">-{$gsum3}</a>
							{/if}
							{if $gsum4 != 0}
							<a href="{php echo filter_url('type:4');}" class="btn {if $type == 4}btn-primary{else}btn-default{/if}">转发红包 <span style="color: #ff0000">-{$gsum4}</a>
							{/if}
							{if $gsum5 != 0}
							<a href="{php echo filter_url('type:5');}" class="btn {if $type == 5}btn-primary{else}btn-default{/if}">阅读红包 <span style="color: #ff0000">-{$gsum5}</a>
							{/if}
							{if $gsum7 != 0}
							<a href="{php echo filter_url('type:7');}" class="btn {if $type == 7}btn-primary{else}btn-default{/if}">摇一摇红包 <span style="color: #ff0000">-{$gsum7}</a>
							{/if}
							{if $gsum6 != 0}
							<a href="{php echo filter_url('type:6');}" class="btn {if $type == 6}btn-primary{else}btn-default{/if}">员工提成 <span style="color: #ff0000">-{$gsum6}</a>
							{/if}
							{if $system['autored']==2}
							<a href="{php echo filter_url('type:10');}" class="btn {if $type == 11}btn-primary{else}btn-default{/if}">自己报名 <span style="color: #ff0000">-{$gsum11}</a>
							<a href="{php echo filter_url('type:99');}" class="btn {if $type == 99}btn-primary{else}btn-default{/if}">手工提现 <span style="color: #ff0000">-{$gsum99}</a>
							{/if}
							<a href="{php echo filter_url('type:9');}" class="btn {if $type == 9}btn-primary{else}btn-default{/if}">单买 <span style="color: #ff0000">-{$gsum9}</a>
						</div>
					</div>
					{if count($themelist)>1}
						<div class="col-sm-3 col-xs-3 col-md-3">
							 <select onchange="submitForm();" class="form-control" name="themeid">
	                   		{loop $themelist $row}
				         		<option value="{$row['id']}" {if $themeid == $row['id'] }selected="selected"{/if}>{$row['id']} - {php echo mb_substr($row['title'],0,8,'utf-8');}</option>
				       		{/loop}
				     		 </select>
			 			</div>
					{else}
						<input type="hidden" name="themeid" value="{$themeid}" /> 
					{/if}
				</div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-1 control-label">红包状态</label>
                    <div class="col-sm-9 col-xs-9 col-md-9">
                        <div class="btn-group">
                            <a href="{php echo filter_url('status:-1');}" class="btn {if $status == -1}btn-primary{else}btn-default{/if}">不限</a>
                            <a href="{php echo filter_url('status:0');}" class="btn {if $status == 0}btn-primary{else}btn-default{/if}">未发放</a>
                            <a href="{php echo filter_url('status:1');}" class="btn {if $status == 1}btn-primary{else}btn-default{/if}">已发放</a>
                            <a href="{php echo filter_url('status:-2');}" class="btn {if $status == -2}btn-primary{else}btn-default{/if}">红包排行榜</a>
                            <a href="{php echo filter_url('status:-3');}" class="btn {if $status == -3}btn-primary{else}btn-default{/if}">红包明细</a>
                        </div>
                    </div>
                </div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-1 control-label">按员工</label>
					<div class="col-sm-3 col-lg-3 col-md-3 col-xs-6">
						 <select class="form-control" name="workerid">
                        <option value="" >全部</option>
                   		{loop $wlist $row}
			         		<option value="{$row['uid']}" {if $workerid == $row['uid'] }selected="selected"{/if}>{if $system['ruanjian']==3}{$row['companyname']}-{/if}{$row['teamname']}-{$row['username']}</option>
			       		{/loop}
			     		 </select>
					</div>
				</div>
				<div class="form-group clearfix">
					<label class="col-xs-12 col-sm-3 col-md-1 control-label">时间</label>
					<div class="col-sm-3 col-lg-3 col-md-3 col-xs-6">
						{php echo view_form_field_daterange('createtime', array('start'=>date('Y-m-d H:i:s',$starttime),'end'=>date('Y-m-d H:i:s',$endtime)), true);}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-1 control-label">关键字</label>
					<div class="col-sm-3 col-lg-3 col-md-3 col-xs-6">
						<input class="form-control" name="keyword" placeholder="可输入昵称、用户名、手机号" type="text" value="{$keyword}">
					</div>
					<div class="col-sm-1 col-lg-1 col-md-1 col-xs-6">
						<button class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
						<input type="hidden" name="__token__" value="{$Request.token}"/>
					</div>
					{if empty($keyword) && $system['autored']==0}
					<div class="col-sm-2 col-lg-2 col-md-2 col-xs-6">
						<button class="btn btn-primary" type="submit" name="submit_updatecomm" value="2" onclick="if(!confirm('批量发放，系统将在短时间内发放符合搜索条件的【等待管理员发红包】的红包！动作不可逆！！！确认操作！')) return false;"  title="批量发放，系统将在短时间内发放符合搜索条件的【等待管理员发红包】的红包！！动作不可逆！！！"> 批量发放</button>
					</div>
					{/if}
					 {if $status == -2}
					<div class="col-sm-1 col-lg-1 col-md-1 col-xs-6">
						<a href="{php echo createWebUrl($do, array('op' => 'update','themeid'=>$themeid));}" class="btn btn-danger" onclick="if(!confirm('当数据不准确时可以更新，一般不需要此操作！')) return false;"  title="当数据不准确时可以更新，一般不需要此操作！" data-toggle="tooltip" data-placement="top">更新排名</a>
                    </div>
                    {/if}
				</div>
            </form>
        </div>
    </div>
    {if $status != -2}
		<div class="panel panel-default">
			<div class="panel-body table-responsive" style="overflow:inherit">
				<table class="table table-hover">
					<thead class="navbar-inner">
						<tr>
							<th width="50">ID</th>
							<th>头像</th>
							<th>昵称</th>
							<th>姓名</th>
							<th>电话</th>
							<th>奖金</th>
							<th>拼团ID</th>
							<th>参团者/地区</th>
							<th>类型</th>
							<th>时间{if !empty($system['wxapp'])}/来自{/if}</th>
							<th>状态</th>
							<th style="width:100px;">备注</th>
							<th style="width:150px; text-align:right;">操作</th>
						</tr>
					</thead>
					<tbody>
						{loop $list $index $row}
						<tr>
							<td><b>{$row['id']}</b></td>
							<td>
								<img src="{php echo tomedia($row['avatar']);}" width="28" style="bsection-radius: 3px;">
							</td>
							<td>
								<a href="{php echo createWebUrl('comm',array('themeid'=>$themeid,'workerid'=>$row['uid'],'op'=>'display','zhijie'=>'true'));}">{$row['nickname']}</a>
							</td>
							<td>
								{$row['user']}
							</td>
							<td>
								{$row['mobile']}
							</td>
							<td>
								<span class="label label-warning">{$row['fee']}</span>
							</td>
							<td>
								<span class="label label-success">{$row['recordid']}</span>
							</td>
							<td>{if $row['type'] == 4 || $row['type'] == 7}
									{$row['city']}<br><a target="_blank" href="http://www.ip138.com/ips138.asp?ip={$row['ip']}&action=2">{$row['ip']}</a>
								{else}
									{$row['username']}
								{/if}
							</td>
							<td>
								{if $row['type']== 0}
								<span class="label label-primary">一级分销红包</span>
								{elseif $row['type'] == 1}
								<span class="label label-primary">一级分销红包</span>
								{elseif $row['type'] == 2}
								<span class="label label-primary">二级分销红包</span>
								{elseif $row['type'] == 3}
								<span class="label label-primary">三级分销红包</span>
								{elseif $row['type'] == 4}
								<span class="label label-warning">转发红包</span>
								{elseif $row['type'] == 5}
								<span class="label label-primary">阅读红包</span>
								{elseif $row['type'] == 6}
								<span class="label label-info">员工提成</span>
								{elseif $row['type'] == 7}
								<span class="label label-warning">摇一摇红包</span>
								{elseif $row['type'] == 9}
								<span class="label label-primary">单买红包</span>
								{elseif $row['type'] == 10}
								<span class="label label-success">进入链接获得</span>
								{elseif $row['type'] == 11}
								<span class="label label-info">自己报名获得</span>
								{elseif $row['type'] == 99}
								<span class="label label-success">手动提现</span>
								{else}
								<span class="label label-danger">未知红包</span>
								{/if}
							</td>
							<td  style="font-size: 10px;max-width: 100px;">{php echo date('Y-m-d',$row['addtime']);}<br>{php echo date('H:i:s',$row['addtime']);}{if !empty($system['wxapp'])}<br>{php echo $system['wxapp']==$row['uniacid']?'小程序':'H5链接';}{/if}</td>
							<td>
								{if $row['status']==0}
									{if $system['autored']==2 && $row['type']!=99}
									<span class="label label-warning">未提现</span>
									{else}
									<span class="label label-danger">未发放</span>								
									{/if}
								{elseif $row['status']==99}
								<span class="label label-success">已提现到帐</span>
								{else}
								<span class="label label-success">已发放</span>
								{/if}
								{if $row['tiaozhuan']==1}
								<br>
								<span class="label label-info">原后台发放</span>
								{/if}
							</td>
							<td style="max-width: 80px;font-size: 10px;">
								{if $row['msg'] =='-2:openid与商户appid不匹配'}
								近期未打开活动链接
								{else}
								{if $row['status']==0}{$row['msg']}{else}成功:{$row['msg']}{/if}
								{/if}
							</td>
							<td style="text-align:right; overflow:visible;">
								
                                <a href="{php echo createWebUrl('commshare', array('op' => 'display','themeid'=>$themeid,'uid'=>$row['uid']));}" class="btn btn-warning btn-sm" title="查看红包记录" data-toggle="tooltip" data-placement="top"  return false;"><i class="fa fa-list"> </i></a>
								{if $row['status']==0}
								{if ($system['autored']<2 || ($system['autored']==2 && $row['type'] == 99)) && $row['type'] != 10 && $row['type'] != 11}
								<a href="{php echo createWebUrl($do, array('op' => 'check','themeid'=>$themeid,'id'=>$row['id']));}" class="btn btn-warning btn-sm" title="自动发放赏金" data-toggle="tooltip" data-placement="top" onclick="if(!confirm('自动发放赏金通过企业付款余额接口自动到账，确定发放吗?')) return false;"><i class="fa fa-undo"> </i></a>
								{/if}

                                <a href="{php echo createWebUrl($do, array('op' => 'delete','themeid'=>$themeid, 'id' => $row['id']));}" class="btn btn-danger btn-sm" onclick="if(!confirm('相关的数据将全被删除，确定删除吗')) return false;"  title="删除" data-toggle="tooltip" data-placement="top"><i class="fa fa-times"> </i></a>
								
								{/if}
							</td>
							
						</tr>
						{/loop}
					
					</tbody>
				</table>
			</div>
		</div>
    {else}
		<div class="panel panel-default">
			<div class="panel-body table-responsive" style="overflow:inherit">
				<table class="table table-hover">
					<thead class="navbar-inner">
						<tr>
							<th width="50">ID</th>
							<th>头像</th>
							<th>昵称</th>
							<th>姓名</th>
							<th>电话</th>
							<th>累计红包</th>
							<th>累计次数</th>
							<th>真实红包</th>
							<th>虚拟红包</th>
							<th>真实次数</th>
							<th>虚拟次数</th>
							<th style="width:100px; text-align:right;">操作</th>
						</tr>
					</thead>
					<tbody>
						{loop $list $index $row}
						<tr>
							<td><b>{$row['id']}</b></td>
							<td>
								<img src="{php echo tomedia($row['avatar']);}" width="28" style="bsection-radius: 3px;">
							</td>
							<td>
								{$row['nickname']}
							</td>
							<td>
								{$row['username']}
							</td>
							<td>
								{$row['mobile']}
							</td>
							<td>
								<span class="label label-success">{$row['feesum']}</span>
							</td>
							<td>
								<span class="label label-success">{$row['commcount']}</span>
							</td>
							<td>
								<span class="label label-info">{php echo $row['feesum']-$row['feesumxuni'];}</span>
							</td>
							<td>
								<span class="label label-warning">{$row['feesumxuni']}</span>
							</td>
							<td>
								<span class="label label-info">{php echo $row['commcount']-$row['commcountxuni'];}</span>
							</td>
							<td>
								<span class="label label-warning">{$row['commcountxuni']}</span>
							</td>
							<td style="text-align:right; overflow:visible;">

                                <a href="{php echo createWebUrl($do, array('op' => 'edit','themeid'=>$themeid, 'id' => $row['id']));}" class="btn btn-info btn-sm"  title="虚拟数" data-toggle="tooltip" data-placement="top"><i class="fa fa-heart"> </i></a>
                                <a href="{php echo createWebUrl('commshare', array('op' => 'display','themeid'=>$themeid,'uid'=>$row['uid'],'openid'=>$row['openid']));}" class="btn btn-warning btn-sm" title="查看红包记录" data-toggle="tooltip" data-placement="top"  return false;"><i class="fa fa-list"> </i></a>
							</td>
							
						</tr>
						{/loop}
					
					</tbody>
				</table>
			</div>
		</div>
    {/if}
		{$pager}
</div>

<script type="text/javascript">


	$('#selectall').click(function(){
		$('#form-order :checkbox').prop('checked', $(this).prop('checked'));
	});

	$('.btn-order').click(function(){
		if($('#form-order :checkbox:checked').length == 0) {
			u.message('请选择定单', '', 'error');
			return false;
		}
		if(!confirm('确定修改定单的状态吗')) {
			return false;
		}
		$('#form-order #status').val($(this).data('id'));
		$('#form-order #type').val($(this).data('type'));
		$('#form-order').submit();
		return false;
	});

	$('.btn-cancel').click(function(e){
		var pay = $(this).data('pay');
		var pay_type = $(this).data('pay-type');
		var tip = '确定取消定单吗';
		if(pay == 1) {
			if(pay_type == 'cash') {
				var tip = '该定单为现金支付, 取消定单需要商家自己处理退款, 确定取消定单吗';
			} else if(pay_type != 'delivery') {
				var tip = '该定单为线上支付, 取消定单将发起退款流程, 确定取消定单吗';
			}
		}
		if(!confirm(tip)) {
			e.preventDefault();
		}
		return true;


});
</script>
{elseif $op == 'show'}
<form class="form-horizontal" role="form">
	<div class="page-trade-order">
		<div class="order-list">
			<div class="freight-content">
				<div class="freight-template-item panel panel-default">
					<div class="panel-body clearfix">
						<div class="col-xs-12 col-sm-6 order-infos">
							<h4>定单信息</h4>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">定单编号：</label>
								<div class="col-md-9 form-control-static">
									{$order['ordersn']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">所属类型：</label>
								<div class="col-md-9 form-control-static">
									{if $order['ordertype']=='special'}
									<span class="label label-info">专题</span>
							{elseif $order['ordertype']=='activity'}
									<span class="label label-primary">活动</span>
							{elseif $order['ordertype']=='buy'}
									<span class="label label-primary">商品</span>
									{else}
									<span class="label label-warning">其他</span>
									{/if}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">客户信息：</label>
								<div class="col-md-9 form-control-static">
									{$order['username']} {$order['mobile']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">下单时间：</label>
								<div class="col-md-9 form-control-static">
									{php echo date('Y-m-d H:i:s', $order['addtime']);}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">定单状态：</label>
								<div class="col-md-9 form-control-static">
									{if $order['status']=='0'}
									<span class="label label-warning">未支付</span>
								{elseif $order['status']=='1'}
									<span class="label label-success">未核销</span>
								{elseif $order['status']=='2'}
									<span class="label label-primary">已核销</span>
								{else}
									<span class="label label-warning">其他</span>
								{/if}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">定单价格：</label>
								<div class="col-md-9 form-control-static">
									￥ {$order['orderfee']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">实际支付：</label>
								<div class="col-md-9 form-control-static">
									￥ {$order['realfee']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">卡券使用：</label>
								<div class="col-md-9 form-control-static">
									{if $row['usecard']==0}
							<span class="label label-info">未使用</span>
							{else}
							<span class="label label-primary">已使用</span>
							{/if}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">付款方式：</label>
								<div class="col-md-9 form-control-static">
									{if !$order['paystate']}
										<span class="label label-danger">未支付</span>
									{else}
										{if $order['type']=='credit'}
											<span class="label label-info">余额支付</span>
											{elseif $order['type']=='wechat'}
											<span class="label label-success">微信支付</span>
											{elseif $order['type']=='delivery'}
											<span class="label label-primary">货到付款</span>
											{else}
											<span class="label label-warning">其他方式</span>
											{/if}
									{/if}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">付款时间：</label>
								<div class="col-md-9 form-control-static">
									{php echo date('Y-m-d H:i:s', $order['paytime']);}
								</div>
							</div>
							
							
						</div>
{if $order['ordertype']=='special'}
						<div class="col-xs-12 col-sm-6">
							<h4>所属专题</h4>
							
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">专题名称：</label>
								<div class="col-md-9 form-control-static">
									{$goods['special']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">购买商品：</label>
								<div class="col-md-9 form-control-static">
									{$goods['title']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">商品数量：</label>
								<div class="col-md-9 form-control-static">
									{$goods['count']}
								</div>
							</div>
						</div>
{elseif $order['ordertype']=='activity'}
						<div class="col-xs-12 col-sm-6">
							<h4>所属活动</h4>
							
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">活动名称：</label>
								<div class="col-md-9 form-control-static">
									{$activity['title']}
								</div>
							</div>
							{loop $liaisons $item}
							
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">报名人信息：</label>
								<div class="col-md-9 form-control-static">
									{$item['username']} {$item['mobile']} 
								</div>
							</div>
							
							{/loop}
						</div>
{elseif $order['ordertype']=='buy'}
						<div class="col-xs-12 col-sm-6">
							<h4>商品信息</h4>
							
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">商品名称：</label>
								<div class="col-md-9 form-control-static">
									{$goods['title']}
								</div>
							</div>
							<div class="form-group clearfix">
								<label class="col-md-3 control-label">商品数量：</label>
								<div class="col-md-9 form-control-static">
									{$goods['count']}
								</div>
							</div>
						</div>
{else}
其他
{/if}

						
						
						
						
					</div>
				</div>
			</div>
		</div>
	</div>
<!-- 		<div class="panel panel-default">
		<div class="panel-heading">商品信息【共 <strong>{$order['num']}</strong> 份,总价 <strong>{$order['price']}</strong> 元】</div>
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th>商品</th>
						<th>份数</th>
						<th>小计(元)</th>
						<th></th>
					</tr>
					{if !empty($order['goods'])}
						{loop $order['goods'] $or}
							<tr>
								<td>{$or['goods_title']}</td>
								<td>{$or['goods_num']} 份</td>
								<td>{$or['goods_price']} 元</td>
								<td>
									<a class="btn btn-success" target="_blank" href="{php echo createWebUrl('goods', array('op' => 'post', 'id' => $or['goods_id']));}">商品信息</a>
								</td>
							</tr>
						{/loop}
					{/if}
				</thead>
			</table>
		</div>
	</div> -->
</form>
{/if}
